# Usage: bretwalda.tcl

if {![info exists eWorkDir]} {set eWorkDir [file dirname [info script]]}

package require DPeye

create {
	outputFile bretwalda.ps 
	title "Bretwalda"
	creator "Mario Huys (woelpad@gmail.com)"
	$MapDrawingScale 1 $MapUnitScale .4 $MapSupplyScale .4
	$FrameThickness 6
	images {
		chart {bretwalda.base.ps {scan {-8 164 619 627} {} {Part1 Part2 Part3} 
			{@E setbbox m moveto C curveto @c closepath S stroke L {LandColor fill} M {MountainColor fill}}
			{NationalBorder S InternalBorder S}}}
		coordinates {bretwalda.base.ps {scan {} {provinces INFO}}}
	}
	borders {
		lands {image {chart LandColor} LandBrown CoastalBorder}
		mountains {image {chart MountainColor} MountainGrey NationalBorder}
		internalBorders {image {chart InternalBorder} {} InternalBorder}
		borders {image {chart NationalBorder} {} NationalBorder}
	}
	locationTypes {
		Supplies {number 0 name 0 draw 1 define -1}
		Territories {number 0 name -1 populate 3 info 1}
	}
	locations {
		coasts {{coordinates provinces} Territories c {Red DarkGreen AF} {
			ABN ABY ALC ARM ART BAM BAN BER BUR CAE CAI
			CAN CHE CIR CUM DAL DEI DEN DOR DUN DYF ESS
			EXE EXM FLA GAL GLA GLO GOD GRG GYR HAM HEB
			HWI INV IOM ION IPS KER LAN LIN LON MAY MER
			MGN MUN NRW ORK POR RHE ROS SCI SST SUS TIN
			TIR TYR WEX WIC WIV WOL YST
		}}
		lands {{coordinates provinces} Territories l {Green DarkGreen A} {
			ATH BUC BUI CAM CAS ELM FAR HAT HER MAN NTN
			PNS POW SHA SHR TAM TAR TRE WAR WEA WIL WIN
			WIX WRO YOR
		}}
		waters {{coordinates provinces} Territories w {White White F} {
			ANG BCH CDG CEL COL CRS DOG ECH FAS FFT HBS
			IRI LYM MAO MIN MOF MOR NAO NCH NSN NSS PEF
			SEV SOD SOJ SOL STG THA WAS
		}}
		mountains {{coordinates provinces} Territories m {Black {} A} {
			CGP CMO HIG
		}}
	}
	units {
		army {A Knight}
		fleet {F ManOfWar}
	}
	powerNameVariations {long orders}
	powers {
		Dalriada {D DarkGrey Black}
		EastAnglia {E LightOrange Black "East Anglia"}
		Gwynedd {G DarkRed Black}
		Kernow {K Lila Black}
		Leinster {L UltraGreen Black}
		Mercia {R DarkBlue Black}
		Northumbria {N DarkBrown Black}
		Pictland {P Purple White}
		Wessex {W ForestGreen Black}
	}
	frame {bbox {} SeaBlue FrameBorder}
	layout image fontSize 8
	nrOfOwnerSupplies 15 pageMarginHeight 50
	orderHasHeading 2
	drawLayoutBorder 0 composed 0 printLayout 0 testBorder 0
	addPage 1 pageContents1 {
		"\{"

		"200 40 DrawFleet"
		"200 40 180 140 ArrowPropose"
		"200 40 100 20 ArrowRetreat"
		"200 40 300 60 ArrowMove"
		
		"180 140 DrawArmy"
		"ProposePhase"
		"180 140 160 240 ArrowMove"
		"RetreatPhase"
		"180 140 80 120 ArrowMove"
		"MovePhase"
		"180 140 280 160 ArrowMove"

		"300 90 DrawFleet"
		"300 90 200 40 180 140 ArrowSupport"
		"300 120 DrawArmy"
		"300 120 180 140 ArrowHold"
		"300 150 DrawFleet"
		"300 150 180 140 160 240 ArrowConvoy"

		"\} dup exec -40 200 translate FailedOrder exec OkOrder 40 -200 translate"
				
		"400 200 DrawFleet"
		"400 200 ArrowArrive"
		"400 230 DrawArmy"
		"400 230 ArrowDepart"
		"400 260 DrawFleet"
		"400 260 ArrowRetreatArrive"
		"400 290 DrawArmy"
		"400 290 ArrowRetreatDepart"
		
		"500 200 DrawFleet"
		"500 200 BuildUnit"
		"500 230 DrawArmy"
		"500 230 DestroyUnit"
		"500 260 DrawFleet"
		"500 260 DisbandUnit"
		"500 290 DrawArmy"
		"500 290 RemoveUnit"
		"500 320 DrawFleet"
		"500 320 FindUnit"
		"500 350 DrawArmy"
		"500 350 LoseUnit"
		"500 380 DrawFleet"
		"500 380 QueryUnit"
    }
}
